<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('goods', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('categories_id');
            $table->string('title', 200)->comment('商品名');
            $table->decimal('market_price', 8, 2)->comment('市场价');
            $table->decimal('shop_price', 8, 2)->comment('商城价');
            $table->string('imgs')->comment('图册');
            $table->string('list_img')->comment('列表图');
            $table->text('content')->comment('商品内容');
            $table->unsignedSmallInteger('click')->comment('点击次数');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('goods');
    }
}
